<!--
 * @Author: cl
 * @Description: 动画练习
 * @Date: 2023-05-11 09:03:46
 * @LastEditTime: 2023-06-02 09:02:39
 * @FilePath: \jsnode\css\anime.html
 * @LastEditors: cl
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./anime.js"></script>
  </head>
  <body>
    <div class="dom-node-demo test">{{val1}}</div>
    <script>
      var elements = document.querySelectorAll(".dom-node-demo");
      let val1 = 2;
      //   anime({
      //     targets: elements,
      //     translateX: 270,
      //   });

      


      anime({
        targets: elements,
        marginLeft: ["240px", "360px", "150px"],
        backgroundColor: ["#fff", "#1d1239", "#921239"],
        borderRadius: ["0%", "50%"],
        easing: "easeInOutQuad",
        rotate: 36,
        val1: 100,
      });
    </script>
    <style>
      .test {
        width: 50px;
      }
    </style>
  </body>
</html>
